<template>
  <div class="home">
    <p>{{num}}</p>
    <el-button msg="主要按钮" @btnclick="add"></el-button>
  </div>
</template>

<script>
// @ is an alias to /src
import elButton from '@/components/elButton.vue'
export default {
  name: 'Home',
  components: {
    elButton
  },
  data(){
    return{
      num: 10
    }
  },
  methods: {
   add(val){
     console.log(val);
     this.num++;
   }
  },
}
</script>
